package xyz.luhui1hao.sell.service;

import org.hibernate.criterion.Order;
import xyz.luhui1hao.sell.domain.OrderMaster;
import xyz.luhui1hao.sell.dto.OrderDTO;

import java.util.List;

/**
 * @InterfaceName OrderService
 * @Description TODO
 * @Author luhui1hao
 * @Date 2018/8/22 上午10:52
 * @Version 1.0
 */
public interface OrderService {

    /**
     * 创建订单
     * @param orderDTO
     * @return
     */
    OrderDTO createOrder(OrderDTO orderDTO);

    /**
     * 查询单个订单
     * @param orderId
     * @return
     */
    OrderDTO findOne(String orderId);

    /**
     * 查询订单列表
     * @param buyerOpenId
     * @param page
     * @param size
     * @return
     */
    List<OrderDTO> findList(String buyerOpenId, int page, int size);

    /**
     * 取消订单
     * @param orderDTO
     * @return
     */
    OrderDTO cancel(OrderDTO orderDTO);

    /**
     * 完结订单
     * @param orderDTO
     * @return
     */
    OrderDTO finish(OrderDTO orderDTO);

    /**
     * 支付订单
     * @param orderDTO
     * @return
     */
    OrderDTO pay(OrderDTO orderDTO);

}
